<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('勘察成果审查')" />
</head>
<body class="gray-bg">
     <div class="form_content">
        <div class="row">
            <div class="col-sm-12 select-table table-striped">
                 <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:src="@{/js/plugins/datetime/moment.js}"></script>
    <script th:inline="javascript">
    var prefix = ctx + "surResult/surResult";
    var dataGuid = [[${guid}]];
    var projectName = [[${projectName}]];
    
    $(function() {
    	 var options = {
    			url: prefix + "/surResultJournal/"+dataGuid,
                detailJournalUrl: prefix + "/surResultJournalDetadil/{id}",
                modalName: "勘察成果审查",
                showSearch: false,
                showRefresh: false,
                showColumns: false,
                showToggle: false,
                columns: [
					{
                        field: 'id',
                        title: '序号',
						formatter: function (value, row, index) {
						
						    return index + 1;
						}
                    },
                    {
                        field: 'guid',
                        title: '标识符',
						visible: false
	                }, 
					{
                        field: 'operatorName',
                        title: '操作员'
                    },
					{
                        field: 'operateDate',
                        title: '操作日期',
						formatter: function (value, row, index) {
							if(value == '' || value == null){
								return value;
							}else{
								return moment(value).format('YYYY-MM-DD HH:mm');	
							}
						}
	                },
                    {
                        field: 'causeContent',
                        title: '处理间隔（工作日）'
                    },
                    {
	                    field: 'role',
	                    title: '操作',
						formatter: function (value, row, index) {
							var pn;
							if(projectName.substr(projectName.length-1,2) != '项目'){
								pn = projectName + '项目';
							}
							pn = pn + '->' + value;
                            var actions = [];
							actions.push('<a href="javascript:void(0)" onclick="$.operate.detailJournal(\'' + pn + '\',\''+ row.guid +'\')">'+value+'</a> ');
                            return actions.join('');
	                    }
	                }]
        };
    	$.table.init(options);
    });
    </script>
</body>
</html>